package 抽象类作业;

import java.util.Scanner;

public class Car {

    public static void main(String[] args) {
//        Car car = new Car();
        SubCar subCar = new SubCar();
        subCar.drive();
    }

    public  String mark;

    public  void  drive(){
        System.out.println("驾驶");
    }


}



class  SubCar extends  Car{
    //价格
 public int price;
 //速度
 public int Speed=10;
    public  void  drive(){
        System.out.println("请输入新的速度");
        Scanner sc = new Scanner(System.in);
        Speed = sc.nextInt();
        System.out.println("新的速度是"+Speed);
    }

}